<?php

namespace Sbing\Cms;

class Outpost extends \Statamic\Licensing\Outpost
{
    public function response()
    {
        return [
            'public'   => true,
            'site'     => [
                'valid' => true,
            ],
            'statamic' => [
                'valid' => true,
            ],
            'packages' => \Statamic\Facades\Addon::all()->mapWithKeys(function (\Statamic\Extend\Addon $addon) {
                return [
                    $addon->package() => [
                        'valid'         => true,
                        'exists'        => true,
                        'version_limit' => null,
                    ],
                ];
            })->all(),
            'expiry'   => now()->addHour()->getTimestamp(),
            'payload'  => $this->payload(),
        ];
    }
}
